package com.sl.springboot.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sl.springboot.entity.Audit;
import com.sl.springboot.mapper.AuditMapper;
import com.sl.springboot.service.AuditService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service

public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements AuditService {

    @Autowired
    private  AuditMapper auditMapper;


    @Override
    public List<Audit> getByUserId(Integer id) {
        QueryWrapper<Audit> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id", id);
        return auditMapper.selectList(queryWrapper);
    }
}
